<template>
    <div class="notices-container ">
        <h3 class="notices-title plr15">{{content.title}}</h3>
        <p v-html="content.content" class="notices-content plr15"></p>
    </div>
</template>

<script>
    export default {
        name: "NoticesList",
        data() {
            return {
                content: {}
            }
        },
        created() {
            this.getNoticesList()
        },
        methods: {
            //获取公告列表
            getNoticesList() {
                let id = this.$route.query.id
                this.$store.dispatch(types.GET_AD_LIST).then(res => {
                    if (res.code !== 0) return
                    res.data.forEach(item => {
                        if (item.id == id) this.content = item
                    })
                    console.log(this.content)
                })
            },
        }
    }
</script>

<style scoped>
    .notices-container {
        height: 100%;
        text-align: center;
        background: #fff;

    }

    .notices-title {
        padding-top: 20px;
        font-size: 20px;
        font-weight: 600;
    }

    .notices-content {
        text-align: left;
        font-size: 14px;
        line-height: 20px;
        background: #fff;
    }

</style>
